<%@ page language="java" import="java.util.*" 
	contentType="text/html;charset=gb2312" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<%@  taglib prefix="s" uri="/struts-tags"%>

<title>登录成功</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<link rel="stylesheet"
		href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css">	
	<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
	<script
		src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>

</head>
<body onresize="resizeFrame();">
	<form action="mlogoutaction.action" method="post">
		<%
		if (session.getAttribute("user") == null
				|| !session.getAttribute("user").equals("root_manager")
				|| !session.getAttribute("role").equals("manager")) {
	%>
		<script language="javascript">
			alert("需要登录");
			window.open("index.jsp", "_self");
		</script>
		<%
			} else {
		%><table><tr><td>Hello Manager!</td><td>
		<input name="submit" type="submit" value="退出"
			onclick="JavaScript:window.location='index.jsp'">
			</td></tr></table>
		<%
			}
		%>
	</form>
	<script type="text/javascript">
		function loadStudentInfo() {
			document.getElementById("page_frame").src = "studentInfo.jsp";
		}

		function loadTeacherInfo() {
			document.getElementById("page_frame").src = "teacherInfo.jsp";
		}
		
		function resizeFrame(){
			document.getElementById("page_frame").width = window.innerWidth-10;
			document.getElementById("page_frame").height = window.innerHeight-100;
		}
	</script>
	<table><tr><td>
	<input id="load_student" type="button" value="学生信息"
		onclick="loadStudentInfo();" /></td>
	<td>
	<input id="load_teacher" type="button" value="教师信息"
		onclick="loadTeacherInfo();" />
	</td></tr></table>
	<iframe src="teacherInfo.jsp" id="page_frame"
		onload="resizeFrame();"> </iframe>
</body>
</html>
